1. Field of Invention
The present invention relates to a data manipulation method of a logical volume manager, and more particularly to a deletion manipulation method of a dependent snapshot volume of the logical volume manager.
2. Related Art
In order to store the data in a computer safely and effectively, many data storage techniques were proposed in the past, such as Redundant Array of Independent Disks (RAID) and logical volume manager (LVM). The LVM integrates multiple physical disks, considers the physical disks as a volume group, and partitions several logical volumes (LVs) from the volume group.
The LVM further provides a snapshot volume (SV) method. The snapshot is to provide a corresponding SV adapted to back up the data in real time at a specific time. The SV backs up the overwritten data in the LV instead of backing up all the data in the LV completely.
FIG. 1 shows the process for the data backup of the LV and the SV. Referring to FIG. 1, the process is as follows. Provide an LV (step S110), and the logical volume has a plurality of pieces of data. Add an SV (step S120). Write new data into a cache (step S130). Read the data in the LV before alteration (step S140). Write the data before alteration into the SV (step S150). Write the new data into the LV from the cache (step S160).
The SVs may be categorized into dependent SVs and independent SVs. The dependent SVs require a lower cost to implement (hardware and software) than the independent SVs. Therefore, many logical volume managing systems still employ dependent SVs. FIG. 2 is a schematic structural view of the dependent SVs in the prior art. Referring to FIG. 2, the top of FIG. 2 represents the raw data in an LV. The time axis from the top to the bottom represents the time sequence of creating the SVs. In FIG. 2, a first SV, a second SV and a third SV are created sequentially. When the data in the LV changes for the first time, the first SV is generated. When the data in the LV changes for the second time, the second SV is generated according to the first SV and the newly changed part of the LV. Similarly, when the data in the LV changes for the third time, the third SV is generated.
Because the first SV makes reference to the second SV, and the second SV makes reference to the third SV, when the second SV is to be deleted, an error that the first SV cannot make reference to the second SV occurs. As for the whole logical volume managing system, all of the unnecessary SVs should be deleted completely.